#!/usr/bin/python3
# -*- coding: utf-8 -*-
# @Time    : 2020/2/21 15:02
# @Author  : HaoXuan
# @Email   : 879316712@qq.com
# @File    : 抓取枪械威力雷达图.py
# @Software: PyCharm
import requests
import pygal  # 图像库

# 数据
akm_x = [48, 60, 50, 34, 68]
m416_x = [30, 40, 60, 45, 19]
xinn = ['威力', '射程', '射速', '稳定性', '子弹数']
# 雷达图设计
radar_chart = pygal.Radar()
# 标题
radar_chart.title = '枪支性能'
# 数据填充
radar_chart.x_labels = xinn
radar_chart.add('AKM', akm_x)
radar_chart.add('M416', m416_x)

# 保存图像
radar_chart.render_to_file('kang.svg')
